Integrand size = 34, antiderivative size = 97 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {1}{8} a (4 A-B) c^2 x+\frac {a (A-B) c^2 \cos ^3(e+f x)}{3 f}+\frac {a (4 A-B) c^2 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a B c^2 \cos ^3(e+f x) \sin (e+f x)}{4 f} \]
1/8*a*(4*A-B)*c^2*x+1/3*a*(A-B)*c^2*cos(f*x+e)^3/f+1/8*a*(4*A-B)*c^2*cos(f *x+e)*sin(f*x+e)/f+1/4*a*B*c^2*cos(f*x+e)^3*sin(f*x+e)/f
Time = 0.80 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.08 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {a c^2 \cos (e+f x) \left (8 A-8 B-\frac {6 (4 A-B) \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )}{\sqrt {\cos ^2(e+f x)}}+3 (4 A+B) \sin (e+f x)-8 (A-B) \sin ^2(e+f x)-6 B \sin ^3(e+f x)\right )}{24 f} \]
(a*c^2*Cos[e + f*x]*(8*A - 8*B - (6*(4*A - B)*ArcSin[Sqrt[1 - Sin[e + f*x] ]/Sqrt[2]])/Sqrt[Cos[e + f*x]^2] + 3*(4*A + B)*Sin[e + f*x] - 8*(A - B)*Si n[e + f*x]^2 - 6*B*Sin[e + f*x]^3))/(24*f)
Time = 0.49 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.89, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.265, Rules used = {3042, 3446, 3042, 3339, 3042, 3148, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^2 (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^2 (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a c \int \cos ^2(e+f x) (A+B \sin (e+f x)) (c-c \sin (e+f x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \cos (e+f x)^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))dx\) |
\(\Big \downarrow \) 3339 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \int \cos ^2(e+f x) (c-c \sin (e+f x))dx-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \int \cos (e+f x)^2 (c-c \sin (e+f x))dx-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \left (c \int \cos ^2(e+f x)dx+\frac {c \cos ^3(e+f x)}{3 f}\right )-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \left (c \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {c \cos ^3(e+f x)}{3 f}\right )-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \left (c \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {c \cos ^3(e+f x)}{3 f}\right )-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a c \left (\frac {1}{4} (4 A-B) \left (\frac {c \cos ^3(e+f x)}{3 f}+c \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )-\frac {B \cos ^3(e+f x) (c-c \sin (e+f x))}{4 f}\right )\) |
a*c*(-1/4*(B*Cos[e + f*x]^3*(c - c*Sin[e + f*x]))/f + ((4*A - B)*((c*Cos[e + f*x]^3)/(3*f) + c*(x/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f))))/4)
3.1.19.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && NeQ[m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 1.26 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.80
method | result | size |
parallelrisch | \(\frac {c^{2} \left (\frac {\left (A -B \right ) \cos \left (3 f x +3 e \right )}{3}+A \sin \left (2 f x +2 e \right )+\frac {B \sin \left (4 f x +4 e \right )}{8}+\left (A -B \right ) \cos \left (f x +e \right )+2 f x A -\frac {f x B}{2}+\frac {4 A}{3}-\frac {4 B}{3}\right ) a}{4 f}\) | \(78\) |
risch | \(\frac {a \,c^{2} x A}{2}-\frac {a \,c^{2} x B}{8}+\frac {c^{2} a \cos \left (f x +e \right ) A}{4 f}-\frac {c^{2} a \cos \left (f x +e \right ) B}{4 f}+\frac {B \,c^{2} a \sin \left (4 f x +4 e \right )}{32 f}+\frac {c^{2} a \cos \left (3 f x +3 e \right ) A}{12 f}-\frac {c^{2} a \cos \left (3 f x +3 e \right ) B}{12 f}+\frac {A \,c^{2} a \sin \left (2 f x +2 e \right )}{4 f}\) | \(126\) |
parts | \(\frac {\left (-A \,c^{2} a -B \,c^{2} a \right ) \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {\left (-A \,c^{2} a +B \,c^{2} a \right ) \cos \left (f x +e \right )}{f}-\frac {\left (A \,c^{2} a -B \,c^{2} a \right ) \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}+a \,c^{2} x A +\frac {B \,c^{2} a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(152\) |
derivativedivides | \(\frac {-\frac {A \,c^{2} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-A \,c^{2} a \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+A \cos \left (f x +e \right ) a \,c^{2}+B \,c^{2} a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {B \,c^{2} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-B \,c^{2} a \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+A \,c^{2} a \left (f x +e \right )-B \cos \left (f x +e \right ) a \,c^{2}}{f}\) | \(185\) |
default | \(\frac {-\frac {A \,c^{2} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-A \,c^{2} a \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+A \cos \left (f x +e \right ) a \,c^{2}+B \,c^{2} a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {B \,c^{2} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-B \,c^{2} a \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+A \,c^{2} a \left (f x +e \right )-B \cos \left (f x +e \right ) a \,c^{2}}{f}\) | \(185\) |
norman | \(\frac {\left (\frac {1}{2} A \,c^{2} a -\frac {1}{8} B \,c^{2} a \right ) x +\left (2 A \,c^{2} a -\frac {1}{2} B \,c^{2} a \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (2 A \,c^{2} a -\frac {1}{2} B \,c^{2} a \right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (3 A \,c^{2} a -\frac {3}{4} B \,c^{2} a \right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (\frac {1}{2} A \,c^{2} a -\frac {1}{8} B \,c^{2} a \right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {2 A \,c^{2} a -2 B \,c^{2} a}{3 f}+\frac {2 \left (A \,c^{2} a -B \,c^{2} a \right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 \left (A \,c^{2} a -B \,c^{2} a \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 \left (A \,c^{2} a -B \,c^{2} a \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {a \,c^{2} \left (4 A -7 B \right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {a \,c^{2} \left (4 A -7 B \right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {a \,c^{2} \left (4 A +B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {a \,c^{2} \left (4 A +B \right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(359\) |
1/4*c^2*(1/3*(A-B)*cos(3*f*x+3*e)+A*sin(2*f*x+2*e)+1/8*B*sin(4*f*x+4*e)+(A -B)*cos(f*x+e)+2*f*x*A-1/2*f*x*B+4/3*A-4/3*B)*a/f
Time = 0.26 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.85 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {8 \, {\left (A - B\right )} a c^{2} \cos \left (f x + e\right )^{3} + 3 \, {\left (4 \, A - B\right )} a c^{2} f x + 3 \, {\left (2 \, B a c^{2} \cos \left (f x + e\right )^{3} + {\left (4 \, A - B\right )} a c^{2} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \]
1/24*(8*(A - B)*a*c^2*cos(f*x + e)^3 + 3*(4*A - B)*a*c^2*f*x + 3*(2*B*a*c^ 2*cos(f*x + e)^3 + (4*A - B)*a*c^2*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 396 vs. \(2 (85) = 170\).
Time = 0.20 (sec) , antiderivative size = 396, normalized size of antiderivative = 4.08 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\begin {cases} - \frac {A a c^{2} x \sin ^{2}{\left (e + f x \right )}}{2} - \frac {A a c^{2} x \cos ^{2}{\left (e + f x \right )}}{2} + A a c^{2} x - \frac {A a c^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {A a c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 A a c^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {A a c^{2} \cos {\left (e + f x \right )}}{f} + \frac {3 B a c^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 B a c^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - \frac {B a c^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 B a c^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {B a c^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {5 B a c^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} + \frac {B a c^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 B a c^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {B a c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {2 B a c^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {B a c^{2} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (A + B \sin {\left (e \right )}\right ) \left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )^{2} & \text {otherwise} \end {cases} \]
Piecewise((-A*a*c**2*x*sin(e + f*x)**2/2 - A*a*c**2*x*cos(e + f*x)**2/2 + A*a*c**2*x - A*a*c**2*sin(e + f*x)**2*cos(e + f*x)/f + A*a*c**2*sin(e + f* x)*cos(e + f*x)/(2*f) - 2*A*a*c**2*cos(e + f*x)**3/(3*f) + A*a*c**2*cos(e + f*x)/f + 3*B*a*c**2*x*sin(e + f*x)**4/8 + 3*B*a*c**2*x*sin(e + f*x)**2*c os(e + f*x)**2/4 - B*a*c**2*x*sin(e + f*x)**2/2 + 3*B*a*c**2*x*cos(e + f*x )**4/8 - B*a*c**2*x*cos(e + f*x)**2/2 - 5*B*a*c**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) + B*a*c**2*sin(e + f*x)**2*cos(e + f*x)/f - 3*B*a*c**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) + B*a*c**2*sin(e + f*x)*cos(e + f*x)/(2*f) + 2 *B*a*c**2*cos(e + f*x)**3/(3*f) - B*a*c**2*cos(e + f*x)/f, Ne(f, 0)), (x*( A + B*sin(e))*(a*sin(e) + a)*(-c*sin(e) + c)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 179 vs. \(2 (89) = 178\).
Time = 0.21 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.85 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a c^{2} - 24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a c^{2} + 96 \, {\left (f x + e\right )} A a c^{2} - 32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a c^{2} + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{2} - 24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{2} + 96 \, A a c^{2} \cos \left (f x + e\right ) - 96 \, B a c^{2} \cos \left (f x + e\right )}{96 \, f} \]
1/96*(32*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a*c^2 - 24*(2*f*x + 2*e - sin (2*f*x + 2*e))*A*a*c^2 + 96*(f*x + e)*A*a*c^2 - 32*(cos(f*x + e)^3 - 3*cos (f*x + e))*B*a*c^2 + 3*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2 *e))*B*a*c^2 - 24*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a*c^2 + 96*A*a*c^2*co s(f*x + e) - 96*B*a*c^2*cos(f*x + e))/f
Time = 0.32 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.13 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {B a c^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {A a c^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} + \frac {1}{8} \, {\left (4 \, A a c^{2} - B a c^{2}\right )} x + \frac {{\left (A a c^{2} - B a c^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} + \frac {{\left (A a c^{2} - B a c^{2}\right )} \cos \left (f x + e\right )}{4 \, f} \]
1/32*B*a*c^2*sin(4*f*x + 4*e)/f + 1/4*A*a*c^2*sin(2*f*x + 2*e)/f + 1/8*(4* A*a*c^2 - B*a*c^2)*x + 1/12*(A*a*c^2 - B*a*c^2)*cos(3*f*x + 3*e)/f + 1/4*( A*a*c^2 - B*a*c^2)*cos(f*x + e)/f
Time = 13.87 (sec) , antiderivative size = 345, normalized size of antiderivative = 3.56 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A\,a\,c^2+\frac {B\,a\,c^2}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (2\,A\,a\,c^2-2\,B\,a\,c^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,A\,a\,c^2-2\,B\,a\,c^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {2\,A\,a\,c^2}{3}-\frac {2\,B\,a\,c^2}{3}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (A\,a\,c^2+\frac {B\,a\,c^2}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (A\,a\,c^2-\frac {7\,B\,a\,c^2}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (A\,a\,c^2-\frac {7\,B\,a\,c^2}{4}\right )+\frac {2\,A\,a\,c^2}{3}-\frac {2\,B\,a\,c^2}{3}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {a\,c^2\,\mathrm {atan}\left (\frac {a\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,A-B\right )}{4\,\left (A\,a\,c^2-\frac {B\,a\,c^2}{4}\right )}\right )\,\left (4\,A-B\right )}{4\,f}-\frac {a\,c^2\,\left (4\,A-B\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )}{4\,f} \]
(tan(e/2 + (f*x)/2)*(A*a*c^2 + (B*a*c^2)/4) + tan(e/2 + (f*x)/2)^4*(2*A*a* c^2 - 2*B*a*c^2) + tan(e/2 + (f*x)/2)^6*(2*A*a*c^2 - 2*B*a*c^2) + tan(e/2 + (f*x)/2)^2*((2*A*a*c^2)/3 - (2*B*a*c^2)/3) - tan(e/2 + (f*x)/2)^7*(A*a*c ^2 + (B*a*c^2)/4) + tan(e/2 + (f*x)/2)^3*(A*a*c^2 - (7*B*a*c^2)/4) - tan(e /2 + (f*x)/2)^5*(A*a*c^2 - (7*B*a*c^2)/4) + (2*A*a*c^2)/3 - (2*B*a*c^2)/3) /(f*(4*tan(e/2 + (f*x)/2)^2 + 6*tan(e/2 + (f*x)/2)^4 + 4*tan(e/2 + (f*x)/2 )^6 + tan(e/2 + (f*x)/2)^8 + 1)) + (a*c^2*atan((a*c^2*tan(e/2 + (f*x)/2)*( 4*A - B))/(4*(A*a*c^2 - (B*a*c^2)/4)))*(4*A - B))/(4*f) - (a*c^2*(4*A - B) *(atan(tan(e/2 + (f*x)/2)) - (f*x)/2))/(4*f)